import { createRouter, createWebHistory,createWebHashHistory  } from 'vue-router'
// import Home from '../views/Home.vue'

const routes = [
    {
        path: '/kzt',
        name: '控制台',
        component: () => import(/* webpackChunkName: "about" */ '../views/控制台.vue'),
        meta: { keepAlive: true }
    },
    {
        path: '/sbgl',
        name: '设备管理',
        component: () => import(/* webpackChunkName: "about" */ '../views/设备管理.vue'),
        meta: { keepAlive: true }
    },
    {
        path: '/zhgl',
        name: '账号管理',
        component: () => import(/* webpackChunkName: "about" */ '../views/账号管理.vue'),
        meta: { keepAlive: true }
    },
    {
        path: '/zhhsz',
        name: '账号回收站',
        component: () => import(/* webpackChunkName: "about" */ '../views/账号回收站.vue'),
        meta: { keepAlive: true }
    },
    {
        path: '/sbqbd',
        name: '设备区绑定',
        component: () => import(/* webpackChunkName: "about" */ '../views/设备区绑定.vue'),
        meta: { keepAlive: true }
    },
    {
        path: '/smsj',
        name: '实名数据',
        component: () => import(/* webpackChunkName: "about" */ '../views/实名数据.vue'),
        meta: { keepAlive: true }
    },
    {
        path: '/update/password',
        name: '修改密码',
        component: () => import(/* webpackChunkName: "about" */ '../views/修改密码.vue'),
        meta: { keepAlive: true }
    },
    {
        path: '/syjc',
        name: '使用教程',
        component: () => import(/* webpackChunkName: "about" */ '../views/使用教程.vue'),
        meta: { keepAlive: true }
    },
    {
        path: '/plsczh',
        name: '批量上传账号',
        component: () => import(/* webpackChunkName: "about" */ '../views/批量上传账号.vue'),
        meta: { keepAlive: true }
    },
    {
        path: '/',
        name: 'Control',
        component: () => import(/* webpackChunkName: "about" */ '../views/Control.vue'),
        meta: { keepAlive: true }
    },
    // {
    //     path: '/home',
    //     name: 'Home',
    //     component: Home
    // },
    {
        path: '/home',
        name: 'Home',
        component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue')
    },
    {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    },
    {
        path: '/login',
        name: '登录界面',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/login.vue')
    },
    {
        path: '/membersUsers',
        name: '添加成员',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/后台成员.vue')
    },
    {
        path: '/addpoints/logs',
        name: '加点日志记录',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/加点记录.vue')
    },
    {
        path: '/replace/device',
        name: '换绑设备',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/换绑设备.vue')
    }
]

const router = createRouter({
    // history: createWebHistory(process.env.BASE_URL),
    history: createWebHashHistory(process.env.BASE_URL  ),
    routes,
})

export default router
